function convertDate(obj) {
    if (obj == null || obj == '') {
        return "";
    } else {
        date = new Date(obj);
        return date.getFullYear() + "年" + (date.getMonth() + 1) + "月" + date.getDate() + "日"
    }
}
//网店网址
var webSiteInfoUrl = null;
var sponsorUrl = null;
var forInvestmentUrl = null;
var baseinfoUrl = null;
var forGuaranteeinfoOrNoUrl = null;
//对外担保
var forGuaranteeinfoUrl = null;
//年报修改
var alterUrl = null;
//企业年报中 分支机构的生产经营信息
var vAnnualReportBranchProductionUrl = null;
var vAnnualReportAlterstockinfoUrl = null;
//农专分支机构
var vAnnualReportSfcBranchUrl = null;
//农专个体许可
var annulLicenceUrl = null;
var alterTotalPageUrl = null;
var vannualSfcAssertUrl = null;
var vAnnPbAssetUrl = null;

//全部网站网店信息   全部对外投资信息
var allWebInfoUrl = null;
var allForinvestmentInfoUrl = null;
//model  网页网站信息
var allWebInfoModelUrl = null;
var allForgModelUrl = null;


var YaHei = "Microsoft YaHei";

//年报年报的点击年份的js
function changeYearForm(anCheIdJs, entTypeJs, anCheYearJs, entTypeResultForJs) {
    var arrayList = anCheIdJs.split(",");
    if (arrayList != null) {
        // 年报中的ID信息
        anCheIdJs = arrayList[0];
        // 年报索引json中提取出的 enttype
        entTypeJs = arrayList[1];
        //年份
        anCheYearJs = arrayList[2];
        entTypeResultForJs = arrayList[3];
    }

    // 企业类型 工商页面中的  enttype
    var entTypeResult = parseInt(entTypeResultForJs);
    if ((entTypeJs == "e") && (entTypeResult > 0 && entTypeResult < 18)) {
        $.ajax({
            type: "GET",
            url: VAnnualReportBaseinfoUrl + anCheIdJs + ".html",
            dataType: "JSON",
            async: false,
            success: function (data) {
                var json = eval(data);
                $("#uniscId").html("").html(json.uniscId);
                $("#entName").html("").html(json.entName);
                $("#tel").html("").html(json.tel);
                $("#addr").html("").html(json.addr);
                $("#postalCode").html("").html(json.postalCode);
                $("#email").html("").html(json.email);
                $("#busSt").html("").html(json.busSt_CN);
                if (json.empNumDis == "2") {
                    $("#empNum").html("").html("企业选择不公示");
                } else {
                    $("#empNum")
                        .html("").html(
                        json.empNum);
                }
                //隶属企业名称
                $("#dependentEntName").html("").html(json.dependentEntName);
                if (json.anCheYear != null && (entTypeResult != 18)) {
                    $("#reportName").html("").html(json.anCheYear + "年度报告" + "<select style='float:left;position:relative;top:10px;font-family:" + YaHei + "' class='f14 ml10' id='AnCheYearAnnual' onChange='changeYearForm(this.value)'><option>" +
                        "选择年份报告</option></select><span>"
                        + " <span class='report_span pl5 pr5 mr10' id='Annual_modify' style='font-size:12px;position:relative;bottom:10px;'>"
                        + " </span>"
                        + "  <span style='float:right;font-size:14px;color:#999;position:relative;top:10px;' >填报时间:<span id='anCheDate'></span></span>");
                    forAnnualDetail("e");
                } else {
                    $("#reportName").html("").html("无");
                }
                var javascriptanChedate = convertDate(json.anCheDate);

                $("#anCheDate").html("").html(javascriptanChedate);
                var javascriptDate = convertDate(json.anCheDate);
                if ((entTypeResult != 18)) {
                    $("#reportFillIn").html("").html(javascriptDate);
                } else {
                    $("#reportFillIn").html("").html("无");
                }

                //获取anCheId
                var anCheId = json.anCheId;

                $.ajax({
                    type: "GET",
                    url: vAnnualReportBaseInfoForJsUrl + anCheId + ".html",
                    dataType: "JSON",
                    async: false,
                    success: function (data) {
                        var json = eval(data);
                        webSiteInfoUrl = json.webSiteInfoUrl;
                        sponsorUrl = json.sponsorUrl;
                        forInvestmentUrl = json.forInvestmentUrl;
                        baseinfoUrl = json.baseinfoUrl;
                        alterUrl = json.alterUrl;
                        vAnnualReportAlterstockinfoUrl = json.vAnnualReportAlterstockinfoUrl;
                        forGuaranteeinfoUrl = json.forGuaranteeinfoUrl;
                        alterTotalPageUrl = json.alterTotalPageUrl;
                        vAnnualReportBranchProductionUrl = json.vAnnualReportBranchProductionUrl;
                        forGuaranteeinfoOrNoUrl = json.forGuaranteeinfoOrNoUrl;
                        allWebInfoUrl = json.allWebInfoUrl;
                        allForinvestmentInfoUrl = json.allForinvestmentInfoUrl;
                        allWebInfoModelUrl = json.allWebInfoModelUrl;
                        allForgModelUrl = json.allForgModelUrl;
                        $.ajax({
                            type: "GET",
                            url: alterTotalPageUrl + "?entType=" + entTypeResult,
                            dataType: "JSON",
                            async: false,
                            success: function (data) {
                                var json = eval(data);
                                var intEntType = parseInt(entTypeResult);
                                if ((intEntType != 18)) {
                                    if (anCheYearJs >= 2016) {
                                        $("#Annual_modify").html("").html("<a href='#modifyMark' style='color:#ed1d4a;'>" +
                                            json.recordsTotal
                                            + "  条修改记录</a>");
                                    } else {
                                        $("#Annual_modify").html("").html("<a href='#modifyMark'  style='color:#ed1d4a;'>" +
                                            json.recordsTotal
                                            + "  条修改记录</a>");
                                    }
                                }
                            }

                        })
                    }
                });
            }
        });
    } else if (entTypeJs == "sfc") {
        $.ajax({
            type: "GET",
            url: VAnnualReportSfcBaseinfoUrl + anCheIdJs + ".html",
            dataType: "JSON",
            async: false,
            success: function (data) {
                var json = eval(data);
                $("#SfcuniscId").html("").html(+json.uniscId);
                $("#SfcfarSpeArtName").html("").html(json.farSpeArtName);
                $("#SfcmemNum").html("").html(json.memNum);
                $("#Sfcfarnum").html("").html(json.farnum);
                $("#SfcannNewMemNum").html("").html(json.annNewMemNum);
                $("#SfcannRedMemNum").html("").html(json.annRedMemNum);
                $("#Sfctel").html("").html(json.tel);
                $("#Sfcemail").html("").html(json.email);
                if (json.anCheYear != null && (entTypeResult != 18)) {
                    $("#reportName").html("").html(json.anCheYear + "年度报告" + "<select style='float:left;position:relative;top:10px;font-family:" + YaHei + "' class='f14 ml10' id='AnCheYearAnnual' onChange='changeYearForm(this.value)'><option>" +
                        "选择年份报告</option></select><span>"
                        + " <span class='report_span pl5 pr5 mr10' id='Annual_modify' style='font-size:12px;position:relative;bottom:10px;'>"
                        + " </span>"
                        + "  <span style='float:right;font-size:14px;color:#999;position:relative;top:10px;' >填报时间:<span id='anCheDate'></span></span>");
                    forAnnualDetail("sfc");
                } else {
                    $("#reportName").html("").html("无");
                }
                var javascriptanChedate = convertDate(json.anCheDate);

                $("#anCheDate").html("").html(javascriptanChedate);
                var javascriptDate = convertDate(json.anCheDate);

                if ((entTypeResult != 18)) {
                    $("#reportFillIn").html("").html(javascriptDate);
                } else {
                    $("#reportFillIn").html("").html("无");
                }
                var anCheId = json.anCheId;
                $.ajax({
                    type: "GET",
                    url: vAnnualSfcReportBaseInfoForJsUrl + anCheId + ".html",
                    dataType: "JSON",
                    async: false,
                    success: function (data) {
                        var json = eval(data);
                        webSiteInfoUrl = json.webSiteInfoUrl;
                        baseinfoUrl = json.baseinfoUrl;
                        alterUrl = json.alterUrl;
                        vAnnualReportSfcBranchUrl = json.vAnnualReportSfcBranchUrl;
                        annulLicenceUrl = json.annulLicenceUrl;
                        alterTotalPageUrl = json.alterTotalPageUrl;
                        vannualSfcAssertUrl = json.vannualSfcAssertUrl;
                        //alert(webSiteInfoUrl);
                        allWebInfoUrl = json.allWebInfoUrl;
                        allWebInfoModelUrl = json.allWebInfoModelUrl;
                        $.ajax({
                            type: "GET",
                            url: alterTotalPageUrl + "?entType=" + entTypeResult,
                            dataType: "JSON",
                            async: false,
                            success: function (data) {
                                var json = eval(data);
                                var intEntType = parseInt(entTypeResult);
                                if ((intEntType != 18)) {
                                    if (anCheYearJs >= 2016) {
                                        $("#Annual_modify").html("").html("<a href='#modifyMark' style='color:#ed1d4a;'>" +
                                            json.recordsTotal
                                            + "  条修改记录</a>");
                                    } else {
                                        $("#Annual_modify").html("").html("<a href='#modifyMark'   style='color:#ed1d4a;'>" +
                                            json.recordsTotal
                                            + "  条修改记录</a>");
                                    }
                                }
                            }

                        })
                    }
                });
            }
        });
    } else if (entTypeJs == "pb") {
        $.ajax({
            type: "GET",
            url: VAnnualReportPbBaseinfoUrl + anCheIdJs + ".html",
            dataType: "JSON",
            async: false,
            success: function (data) {
                var json = eval(data);
                console.log(json);
                $("#PbuniscId").html("").html(json.uniscId);
                $("#PbtraName").html("").html(json.traName);
                $("#Pbname").html("").html(json.name);
                $("#Pbtel").html("").html(json.tel);
                $("#PbempNum").html("").html(json.empNum);
                $("#PbfundAm").html("").html(json.fundAm + '万');
                if (json.anCheYear != null && (entTypeResult != 18)) {
                    $("#reportName").html("").html(json.anCheYear + "年度报告" + "<select style='float:left;position:relative;top:10px;font-family:" + YaHei + "' class='f14 ml10' id='AnCheYearAnnual' onChange='changeYearForm(this.value)'><option>" +
                        "选择年份报告</option></select><span>"
                        + " <span class='report_span pl5 pr5 mr10' id='Annual_modify' style='font-size:12px;position:relative;bottom:10px;'>"
                        + " </span>"
                        + "  <span style='float:right;font-size:14px;color:#999;position:relative;top:10px;' >填报时间:<span id='anCheDate'></span></span>");
                    forAnnualDetail("pb");
                } else {
                    $("#reportName").html("").html("无");
                }
                var javascriptanChedate = convertDate(json.anCheDate);

                $("#anCheDate").html("").html(javascriptanChedate);
                var javascriptDate = convertDate(json.anCheDate);

                if ((entTypeResult != 18)) {
                    $("#reportFillIn").html("").html(javascriptDate);
                } else {
                    $("#reportFillIn").html("").html("无");
                }
                var anCheId = json.anCheId;
                $.ajax({
                    type: "GET",
                    url: vAnnualPbReportBaseInfoForJsUrl + anCheId + ".html",
                    dataType: "JSON",
                    async: false,
                    success: function (data) {
                        var json = eval(data);
                        webSiteInfoUrl = json.webSiteInfoUrl;
                        alterUrl = json.alterUrl;
                        vAnnualReportSfcBranchUrl = json.vAnnualReportSfcBranchUrl;
                        annulLicenceUrl = json.annulLicenceUrl;
                        alterTotalPageUrl = json.alterTotalPageUrl;
                        vAnnPbAssetUrl = json.vAnnPbAssetUrl;
                        allWebInfoUrl = json.allWebInfoUrl;
                        allWebInfoModelUrl = json.allWebInfoModelUrl;

                        $.ajax({
                            type: "GET",
                            url: alterTotalPageUrl + "?entType=" + entTypeResult,
                            dataType: "JSON",
                            async: false,
                            success: function (data) {
                                var json = eval(data);
                                var intEntType = parseInt(entTypeResult);
                                if ((intEntType != 18)) {
                                    if (anCheYearJs >= 2016) {
                                        $("#Annual_modify").html("").html("<a href='#modifyMark' style='color:#ed1d4a;'>" +
                                            json.recordsTotal
                                            + "  条修改记录</a>");
                                    } else {
                                        $("#Annual_modify").html("").html("<a href='#modifyMark'  style='color:#ed1d4a;'>" +
                                            json.recordsTotal
                                            + "  条修改记录</a>");
                                    }
                                }
                            }
                        })
                    }
                });
            }
        });
    } else {
        $("#reportName").html("").html("无");
    }

    //企业资产信息是否公示
    $.ajax({
        type: "POST",
        url: baseinfoUrl,
        dataType: "JSON",
        async: false,
        success: function (data) {
            if (data.data != null && data.data.length > 0) {
                //资产总额是否公示
                var assGroDisIs = data.data[0].assGroDis;
                if (assGroDisIs == 1) {
                    $("#assGroDisIs").html("").html(data.data[0].assGro);
                } else {
                    $("#assGroDisIs").html("").html("企业选择不公示");
                }
                //所有者权益合计是否公示
                var totEquDisIs = data.data[0].totEquDis;
                if (totEquDisIs == 1) {
                    $("#totEquDisIs").html("").html(data.data[0].totEqu);
                } else {
                    $("#totEquDisIs").html("").html("企业选择不公示");
                }
                //营业总收入是否公示
                var vendIncDisIs = data.data[0].vendIncDis;
                if (vendIncDisIs == 1) {
                    $("#vendIncDisIs").html("").html(data.data[0].vendInc);
                } else {
                    $("#vendIncDisIs").html("").html("企业选择不公示");
                }
                //利润总额是否公示
                var proGroDisIs = data.data[0].proGroDis;
                if (proGroDisIs == 1) {
                    $("#proGroDisIs").html("").html(data.data[0].proGro);
                } else {
                    $("#proGroDisIs").html("").html("企业选择不公示");
                }
                //其中主营业务收入是否公示
                var maiBusIncDisIs = data.data[0].maiBusIncDis;
                if (maiBusIncDisIs == 1) {
                    $("#maiBusIncDisIs").html("").html(data.data[0].maiBusInc);
                } else {
                    $("#maiBusIncDisIs").html("").html("企业选择不公示");
                }
                //净利润是否公示
                var netIncDisIs = data.data[0].netIncDis;
                if (netIncDisIs == 1) {
                    $("#netIncDisIs").html("").html(data.data[0].netInc);
                } else {
                    $("#netIncDisIs").html("").html("企业选择不公示");
                }
                //纳税总额是否公示
                var ratGroDisIs = data.data[0].ratGroDis;
                if (ratGroDisIs == 1) {
                    $("#ratGroDisIs").html("").html(data.data[0].ratGro);
                } else {
                    $("#ratGroDisIs").html("").html("企业选择不公示");
                }
                //负债总额是否公示
                var liaGroDisIs = data.data[0].liaGroDis;
                if (liaGroDisIs == 1) {
                    $("#liaGroDisIs").html("").html(data.data[0].liaGro);
                } else {
                    $("#liaGroDisIs").html("").html("企业选择不公示");
                }
            }
        }
    })
    //个体年报信息   生产经营状况信息  是否公示
    $.ajax({
        type: "POST",
        url: vAnnPbAssetUrl,
        dataType: "JSON",
        async: false,
        success: function (data) {
            if (data.data != null && data.data.length > 0) {
                //纳税总额是否公示
                var ratGroDisIs = data.data[0].ratGroDis;
                if (ratGroDisIs == 1) {
                    $("#ratGroDis").html("").html(data.data[0].ratGro);
                } else {
                    $("#ratGroDis").html("").html("个体户选择不公示");
                }
                //营业额是否公示
                var vendIncDisIs = data.data[0].vendIncDis;
                if (vendIncDisIs == 1) {
                    $("#vendIncDis").html("").html(data.data[0].vendInc);
                } else {
                    $("#vendIncDis").html("").html("个体户选择不公示");
                }
            }
        }
    })
    //农专年报信息   生产经营状况信息  是否公示
    $.ajax({
        type: "POST",
        url: vannualSfcAssertUrl,
        dataType: "JSON",
        async: false,
        success: function (data) {
            if (data.data != null && data.data.length > 0) {
                //销售额或营业收入是否公示
                var priYeaSalesDisIs = data.data[0].priYeaSalesDis;
                if (priYeaSalesDisIs == 1) {
                    $("#priYeaSales").html("").html(data.data[0].priYeaSales);
                } else {
                    $("#priYeaSales").html("").html("农专社选择不公示");
                }
                //盈余总额是否公示
                var priYeaProfitDisIs = data.data[0].priYeaProfitDis;
                if (priYeaProfitDisIs == 1) {
                    $("#priYeaProfit").html("").html(data.data[0].priYeaProfit);
                } else {
                    $("#priYeaProfit").html("").html("农专社选择不公示");
                }
                //获得政府扶持资金、补助是否公示
                var priYeaSubDisIs = data.data[0].priYeaSubDis;
                if (priYeaSubDisIs == 1) {
                    $("#priYeaSub").html("").html(data.data[0].priYeaSub);
                } else {
                    $("#priYeaSub").html("").html("农专社选择不公示");
                }
                //纳税金额是否公示
                var ratGroDisIs = data.data[0].ratGroDis;
                if (ratGroDisIs == 1) {
                    $("#ratGro").html("").html(data.data[0].ratGro);
                } else {
                    $("#ratGro").html("").html("农专社选择不公示");
                }
                //金融贷款是否公示
                var priYeaLoanDisIs = data.data[0].priYeaLoanDis;
                if (priYeaLoanDisIs == 1) {
                    $("#priYeaLoan").html("").html(data.data[0].priYeaLoan);
                } else {
                    $("#priYeaLoan").html("").html("农专社选择不公示");
                }
            }
        }
    })


    //获取企业类型信息
    var ent_type_result = document.getElementById("entType").value;


    var isannualReport = false;
    //$('div#annualReport').removeClass('tabin')
    $('div#annualReport').addClass('tabin')
    if (!isannualReport) {
        isannualReport = true;
        // 企业年报信息
        var sponsorColumns = [
            "invName",
            "invName",
            "liSubConAm",
            "subConDate",
            "subConFormName",
            "liAcConAm",
            "acConDate",
            "acConForm_CN"
        ];

        var forGuaranteeinfoColumns = [
            "index",
            "more",
            "mortgagor",
            "priClaSecKind",
            "priClaSecAm",
            "pefPerForm",
            "pefPerTo",
            "guaranperiod",
            "gaType"
        ];

        var alterColumns = [
            "alitem",
            "alitem",
            "altBe",
            "altAf",
            "altDate"
        ];

        //农专年报信息中的行政许可信息
        var annualSfcLicenceColumns = [
            "licName",
            "valTo"
        ];
        //农专年报信息中的 分支机构信息
        var annualSfcBranchColumns = [
            "uniscId",
            "brName"
        ];
        //企业年报信息中的股权变更信息
        var vAnnualReportAlterstockColumns = [
            "inv",
            "inv",
            "transAmPr",
            "transAmAft",
            "altDate"
        ];

        if (annualBranchInfo != null) {
            //农专年报 分支机构信息
            annualBranchInfo.destroy();
            annualBranchInfo = new customtableForSfc("needPaging_AnnBranch", vAnnualReportSfcBranchUrl, annualSfcBranchColumns, "分支机构信息");
        }
        //农专年报中   许可信息
        if (annulLicenceUrl != null) {
            annualLicenceInfo.destroy();
            annualLicenceInfo = $("#needPaging_AnnLicenceinfo").DataTable({
                "bAutoWidth": false,
                "pagingType": "full_numbers",
                "language": {
                    "processing": "正在加载，请稍后",
                    "lengthMenu": "显示 _MENU_ 项结果",
                    "zeroRecords": "暂无行政许可信息",
                    "info": "共 查询到 _TOTAL_ 条记录    共 _PAGES_ 页 ",
                    "infoEmpty": "共 查询到 0 条记录    共 0 页",
                    "infoFiltered": "(由 _MAX_ 项结果过滤)",
                    "infoPostFix": "",
                    "url": "",
                    "paginate": {
                        "first": "|< ",
                        "previous": "<< ",
                        "next": ">>",
                        "last": ">|"
                    }
                },
                "processing": true,
                "serverSide": true,
                "ordering": false,
                "ajax": {
                    "url": annulLicenceUrl + "?entType=" + ent_type_result,
                    "type": "POST"
                },
                "columns": tablecolumns(annualSfcLicenceColumns),
                "columnDefs": [{
                    "targets": 1,
                    "render": function (data) {
                        var javascriptDate = convertDate(data);
                        return "<tr>" + javascriptDate + "</tr>";
                    }
                }]
            });
        }

        if (vAnnualReportBranchProductionUrl != null) {
            $.ajax({
                type: "POST",
                url: vAnnualReportBranchProductionUrl,
                dataType: "JSON",
                async: false,
                success: function (data) {
                    if (data && data.data) {
                        var data = data.data[0];
                        var tds = $('#needPaging_branchProduction').find('td');
                        if (data.maiBusIncDis == 1) {
                            tds.eq(1).html(Math.round(data.maiBusInc));
                        } else {
                            tds.eq(1).html('企业选择不公示');
                        }
                        if (data.ratGroDis == 1) {
                            tds.eq(3).html(Math.round(data.ratGro));
                        } else {
                            tds.eq(3).html('企业选择不公示');
                        }
                        if (data.netIncDis == 1) {
                            tds.eq(5).html(Math.round(data.netInc));
                        } else {
                            tds.eq(5).html('企业选择不公示');
                        }
                    } else {
                        $('#needPaging_branchProduction').remove();
                        $('#onePbAss').append('<p>暂无生产经营状态信息</p>')
                    }

                }
            });
        }

        //股东股权信息 初始化变量
        var AlterStockInfo = null;
        if (vAnnualReportAlterstockinfoUrl != null) {
            vAnnualReportAlterstockInfo.destroy();
            vAnnualReportAlterstockInfo = $("#needPaging_shareChanged").DataTable({
                "bAutoWidth": false,
                "pagingType": "full_numbers",
                "language": {
                    "processing": "正在加载，请稍后",
                    "lengthMenu": "显示 _MENU_ 项结果",
                    "zeroRecords": "暂无股权变更信息",
                    "info": "共 查询到 _TOTAL_ 条记录    共 _PAGES_ 页 ",
                    "infoEmpty": "共 查询到 0 条记录    共 0 页",
                    "infoFiltered": "(由 _MAX_ 项结果过滤)",
                    "infoPostFix": "",
                    "url": "",
                    "paginate": {
                        "first": "|< ",
                        "previous": "<< ",
                        "next": ">>",
                        "last": ">|"
                    }
                },
                "processing": true,
                "serverSide": true,
                "ordering": false,
                "ajax": {
                    "url": vAnnualReportAlterstockinfoUrl,
                    "type": "POST"
                },
                "columns": tablecolumns(vAnnualReportAlterstockColumns),
                "destroy": true,
                "columnDefs": [{
                    "targets": 4,
                    "render": function (data) {
                        AlterStockInfo = data;
                        if (AlterStockInfo != null) {
                            $("#alterStockInfo").html("是");
                        }
                        var javascriptDate = convertDate(data);
                        return "<tr>" + javascriptDate + "</tr>";
                    }
                }, {
                    "targets": [0],
                    "render": function (data, x, obj, index, y) {
                        return index.row + index.settings._iDisplayStart + 1;
                    }
                }]
            });
        }
        //默认为否
        $("#alterStockInfo").html("否");
        if (sponsorUrl != null) {
            sponsorInfo.destroy();
            sponsorInfo = $("#needPaging_share").DataTable({
                "bAutoWidth": false,
                "pagingType": "full_numbers",
                "language": {
                    "processing": "正在加载，请稍后",
                    "lengthMenu": "显示 _MENU_ 项结果",
                    "zeroRecords": "暂无股东及出资信息",
                    "info": "共 查询到 _TOTAL_ 条记录    共 _PAGES_ 页 ",
                    "infoEmpty": "共 查询到 0 条记录    共 0 页",
                    "infoFiltered": "(由 _MAX_ 项结果过滤)",
                    "infoPostFix": "",
                    "url": "",
                    "paginate": {
                        "first": "|< ",
                        "previous": "<< ",
                        "next": ">>",
                        "last": ">|"
                    }
                },
                "processing": true,
                "serverSide": true,
                "ordering": false,
                "ajax": {
                    "url": sponsorUrl,
                    "type": "POST"
                },
                "columns": tablecolumns(sponsorColumns),
                "destroy": true,
                "columnDefs": [{
                    "targets": [3, 6],
                    "render": function (data) {
                        var javascriptDate = convertDate(data);
                        return "<tr>" + javascriptDate + "</tr>";
                    }
                }, {
                    "targets": [0],
                    "render": function (data, x, obj, index, y) {
                        return index.row + index.settings._iDisplayStart + 1;
                    }
                }]
            });
        }

        //是否公示对外担保信息
        $.ajax({
            type: "POST",
            url: forGuaranteeinfoOrNoUrl,
            dataType: "JSON",
            async: false,
            success: function (data) {
                var booleanOr = data.hadData;
                if (booleanOr == 1) {

                    $("#oneForGua").show();
                    $("#twoForGua").hide();
                    if (forGuaranteeinfoUrl != null) {
                        forGuaranteeinfo = $("#needPaging_guarantee").DataTable({
                            "bAutoWidth": false,
                            "pagingType": "full_numbers",
                            "language": {
                                "processing": "正在加载，请稍后",
                                "lengthMenu": "显示 _MENU_ 项结果",
                                "zeroRecords": "暂无对外提供保证担保信息",
                                "info": "共 查询到 _TOTAL_ 条记录    共 _PAGES_ 页 ",
                                "infoEmpty": "共 查询到 0 条记录    共 0 页",
                                "infoFiltered": "(由 _MAX_ 项结果过滤)",
                                "infoPostFix": "",
                                "url": "",
                                "paginate": {
                                    "first": "|< ",
                                    "previous": "<< ",
                                    "next": ">>",
                                    "last": ">|"
                                }
                            },
                            "bAutoWidth": false,
                            "processing": true,
                            "serverSide": true,
                            "ordering": false,
                            "ajax": {
                                "url": forGuaranteeinfoUrl,
                                "type": "POST"
                            },
                            "columns": tablecolumns(forGuaranteeinfoColumns),
                            "destroy": true,
                            "columnDefs": [{
                                "targets": [5, 6],
                                "render": function (data) {
                                    var javascriptDate = convertDate(data);
                                    return "<tr>" + javascriptDate + "</tr>";
                                }
                            }, {
                                "targets": [0],
                                "render": function (data, x, obj, index, y) {
                                    return index.row + index.settings._iDisplayStart + 1;
                                }
                            }, {
                                "targets": [3],
                                "render": function (data) {
                                    if (data == 1) {
                                        return "合同";
                                    } else if (data == 2) {
                                        return "其他";
                                    }
                                }
                            }]
                        });
                    }
                } else {
                    $("#oneForGua").hide();
                    $("#twoForGua").show();
                }
            }
        })
        //需要覆盖其他年报中修改为红字的
        $("#annualBranchBusinessColor").addClass("classify").html("").html("生产经营情况信息").css("color", "#804000");
        $("#annualLicenceColor").addClass("classify").html("").html("行政许可信息").css("color", "#804000");
        $("#annualBranchColor").addClass("classify").html("").html("分支机构信息").css("color", "#804000");
        $("#annualSponAlterColor").addClass("classify").html("").html("股权变更信息").css("color", "#804000");
        $("#annualGuaranteeColor").addClass("classify").html("").html("对外提供担保信息").css("color", "#804000");
        $("#annualAssetsColor1").addClass("classify").html("").html("企业资产状况").css("color", "#804000");
        $("#annualAssetsColor2").addClass("classify").html("").html("企业资产状况").css("color", "#804000");
        $("#annualAssetsColor3").addClass("classify").html("").html("企业资产状况").css("color", "#804000");
        $("#annualToOutAll").addClass("classify").html("").html("对外投资信息").css("color", "#804000");
        $("#annualSponColor").addClass("classify").html("").html("股东及出资信息").css("color", "#804000");
        $("#annualWebAll").addClass("classify").html("").html("网站或网店信息").css("color", "#804000");
        $("#annualBaseInfoColor1").addClass("classify").html("").html("基本信息").css("color", "#804000");
        $("#annualBaseInfoColor2").addClass("classify").html("").html("基本信息").css("color", "#804000");
        $("#annualBaseInfoColor3").addClass("classify").html("").html("基本信息").css("color", "#804000");
        $("#annualBaseInfoColor4").addClass("classify").html("").html("基本信息").css("color", "#804000");
        $("#addrForColor1").html("企业通信地址：").css("color", "#131313");
        $("#addrForColor2").html("企业通信地址：").css("color", "#131313");
        $("#uniscIdForColor1").html("统一社会信用代码/注册号：").css("color", "#131313");
        $("#uniscIdForColor2").html("统一社会信用代码/注册号：").css("color", "#131313");
        $("#uniscIdForColor3").html("统一社会信用代码/注册号：").css("color", "#131313");
        $("#uniscIdForColor4").html("营业执照注册号：").css("color", "#131313");
        $("#entNameForColor1").html("企业名称：").css("color", "#131313");
        $("#entNameForColor2").html("企业名称：").css("color", "#131313");
        $("#entNameForColor3").html("合作社名称：").css("color", "#131313");
        $("#entNameForColor4").html("个体商户名称：").css("color", "#131313");
        $("#telForColor1").html("企业联系电话：").css("color", "#131313");
        $("#telForColor2").html("企业联系电话：").css("color", "#131313");
        $("#telForColor3").html("联系电话：").css("color", "#131313");
        $("#telForColor4").html("经营者联系电话：").css("color", "#131313");
        $("#postForColor1").html("邮政编码：").css("color", "#131313");
        $("#postForColor2").html("邮政编码：").css("color", "#131313");
        $("#emailForColor1").html("企业电子邮箱：").css("color", "#131313");
        $("#emailForColor2").html("电子邮箱：").css("color", "#131313");
        $("#emailForColor3").html("电子邮箱：").css("color", "#131313");
        $("#empNumForColor1").html("从业人数：").css("color", "#131313");
        $("#empNumForColor2").html("从业人数：").css("color", "#131313");
        $("#empNumForColor3").html("成员人数：").css("color", "#131313");
        $("#empNumForColor4").html("从业人数：").css("color", "#131313");
        $("#busStForColor1").html("企业经营状态：").css("color", "#131313");
        $("#busStForColor2").html("经营状态：").css("color", "#131313");
        $("#dependForColor2").html("隶属企业名称：").css("color", "#131313");
        $("#SfcfarnumForColor3").html("成员人数中农民人数：").css("color", "#131313");
        $("#SfcannNewMemNumForColor3").html("本年度新增成员人数：").css("color", "#131313");
        $("#SfcannRedMemNumForColor3").html("本年度退出成员人数：").css("color", "#131313");
        $("#pbNameForColor4").html("经营者姓名：").css("color", "#131313");
        $("#PbfundAmForColor4").html("资金数额：").css("color", "#131313");

        //年报中  公司的年报的修改记录
        if (alterUrl != null) {
            alterEInfo.destroy();
            alterEInfo = $("#needPaging_modify").DataTable({
                "bAutoWidth": false,
                "pagingType": "full_numbers",
                "language": {
                    "processing": "正在加载，请稍后",
                    "lengthMenu": "显示 _MENU_ 项结果",
                    "zeroRecords": "暂无修改记录",
                    "info": "共 查询到 _TOTAL_ 条记录    共 _PAGES_ 页 ",
                    "infoEmpty": "共 查询到 0 条记录    共 0 页",
                    "infoFiltered": "(由 _MAX_ 项结果过滤)",
                    "infoPostFix": "",
                    "url": "",
                    "paginate": {
                        "first": "|< ",
                        "previous": "<< ",
                        "next": ">>",
                        "last": ">|"
                    }
                },
                "processing": true,
                "serverSide": true,
                "ordering": false,
                "ajax": {
                    "url": alterUrl + "?entType=" + ent_type_result,
                    "type": "POST"
                },
                "columns": tablecolumns(alterColumns),
                "destroy": true,
                "columnDefs": [
                    {
                        "targets": 4,
                        "render": function (data) {
                            var javascriptDate = convertDate(data);
                            return "<tr>" + javascriptDate + "</tr>";
                        }

                    },
                    {
                        "targets": 1,
                        "render": function (data, type, row) {
                            //alert(anCheYearJs);

                            if (anCheYearJs >= 2016) {
                                if (row.alitem == "基本信息") {
                                    $("#annualBaseInfoColor1").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                        "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>基本信息</a></div>");
                                    $("#annualBaseInfoColor2").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                        "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>基本信息</a></div>");
                                    $("#annualBaseInfoColor3").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                        "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>基本信息</a></div>");
                                    $("#annualBaseInfoColor4").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                        "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>基本信息</a></div>");
                                } else if (row.alitem == "网站或网店信息") {
                                    $("#annualWebAll").removeClass("classify");
                                    $("#annualWebColor").removeClass("classify").html("").html(" " +
                                        "<a class='classify' href='#modifyMark' style='float:left;margin-bottom:10px;font-size:16px;color:#FF0000;font-size:16px;'>网站或网店信息</a>");
                                } else if (row.alitem == "股东及出资信息") {
                                    $("#annualSponColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                        "<a  href='#modifyMark' style='color:#FF0000;font-size:16px;'>股东及出资信息</a></div>");
                                } else if (row.alitem == "对外投资信息") {
                                    $("#annualToOutAll").removeClass("classify");
                                    $("#annualToOutColor").removeClass("classify").html("").html("" +
                                        "<a class='classify' href='#modifyMark' style='float:left;margin-bottom:10px;font-size:16px;color:#FF0000;font-size:16px;'>对外投资信息</a>");
                                } else if (row.alitem == "企业资产状况") {
                                    $("#annualAssetsColor1").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                        "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>企业资产状况</a></div>");
                                    $("#annualAssetsColor2").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                        "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>企业资产状况</a></div>");
                                    $("#annualAssetsColor3").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                        "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>企业资产状况</a></div>");
                                } else if (row.alitem == "对外提供担保信息") {
                                    $("#annualGuaranteeColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;'>" +
                                        "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>对外提供担保信息</a></div>");
                                } else if (row.alitem == "股权变更信息") {
                                    $("#annualSponAlterColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                        "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>股权变更信息</a></div>");
                                } else if (row.alitem == "分支机构信息") {
                                    $("#annualBranchColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                        "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>分支机构信息</a></div>");
                                } else if (row.alitem == "行政许可信息") {
                                    $("#annualLicenceColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                        "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>行政许可信息</a></div>");
                                } else if (row.alitem == "生产经营情况信息") {
                                    $("#annualBranchBusinessColor").removeClass("classify").html("").html("<div  class='classify' style='float:left;margin-bottom:10px;font-size:16px;'>" +
                                        "<a href='#modifyMark' style='color:#FF0000;font-size:16px;'>生产经营情况信息</a></div>");
                                }
                                //企业通信地址
                                else if (row.alitem == "企业通信地址") {
                                    $("#addrForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业通信地址：</a>");
                                    $("#addrForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业通信地址：</a>");
                                }
                                else if (row.alitem == "统一社会信用代码/注册号" || row.alitem == "营业执照注册号") {
                                    $("#uniscIdForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>统一社会信用代码/注册号：</a>");
                                    $("#uniscIdForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>统一社会信用代码/注册号：</a>");
                                    $("#uniscIdForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>统一社会信用代码/注册号：</a>");
                                    $("#uniscIdForColor4").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>营业执照注册号：</a>");
                                } else if (row.alitem == "企业名称" || row.alitem == "合作社名称" || row.alitem == "个体商户名称") {
                                    $("#entNameForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业名称：</a>");
                                    $("#entNameForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业名称：</a>");
                                    $("#entNameForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>合作社名称：</a>");
                                    $("#entNameForColor4").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>个体商户名称：</a>");
                                } else if (row.alitem == "企业联系电话" || row.alitem == "联系电话" || row.alitem == "经营者联系电话") {
                                    $("#telForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业联系电话：</a>");
                                    $("#telForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业联系电话：</a>");
                                    $("#telForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>联系电话：</a>");
                                    $("#telForColor4").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>经营者联系电话：</a>");
                                } else if (row.alitem == "邮政编码") {
                                    $("#postForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>邮政编码：</a>");
                                    $("#postForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>邮政编码：</a>");
                                } else if (row.alitem == "企业电子邮箱" || row.alitem == "电子邮箱") {
                                    $("#emailForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业电子邮箱：</a>");
                                    $("#emailForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>电子邮箱：</a>");
                                    $("#emailForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>电子邮箱：</a>");
                                } else if (row.alitem == "从业人数" || row.alitem == "成员人数") {
                                    $("#empNumForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>从业人数：</a>");
                                    $("#empNumForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>从业人数：</a>");
                                    $("#empNumForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>成员人数：</a>");
                                    $("#empNumForColor4").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>从业人数：</a>");
                                } else if (row.alitem == "经营状态") {
                                    $("#busStForColor1").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>企业经营状态：</a>");
                                    $("#busStForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>经营状态：</a>");
                                } else if (row.alitem == "隶属企业名称") {
                                    $("#dependForColor2").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>隶属企业名称：</a>");
                                } else if (row.alitem == "成员人数中农民人数") {
                                    $("#SfcfarnumForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>成员人数中农民人数：</a>");
                                } else if (row.alitem == "本年度新增成员人数") {
                                    $("#SfcannNewMemNumForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>本年度新增成员人数：</a>");
                                } else if (row.alitem == "本年度退出成员人数") {
                                    $("#SfcannRedMemNumForColor3").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>本年度退出成员人数：</a>");
                                } else if (row.alitem == "经营者姓名") {
                                    $("#pbNameForColor4").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>经营者姓名：</a>");
                                } else if (row.alitem == "资金数额") {
                                    $("#PbfundAmForColor4").html("<a href='#modifyMark' style='color:#FF0000;font-size:14px;'>资金数额：</a>");
                                }
                            } else {
                                $("#annualBranchBusinessColor").css("color", "#804000");
                                $("#annualLicenceColor").css("color", "#804000");
                                $("#annualBranchColor").css("color", "#804000");
                                $("#annualSponAlterColor").css("color", "#804000");
                                $("#annualGuaranteeColor").css("color", "#804000");
                                $("#annualAssetsColor1").css("color", "#804000");
                                $("#annualAssetsColor2").css("color", "#804000");
                                $("#annualAssetsColor3").css("color", "#804000");
                                $("#annualToOutColor").css("color", "#804000");
                                $("#annualSponColor").css("color", "#804000");
                                $("#annualWebColor").css("color", "#804000");
                                $("#annualBaseInfoColor1").css("color", "#804000");
                                $("#annualBaseInfoColor2").css("color", "#804000");
                                $("#annualBaseInfoColor3").css("color", "#804000");
                                $("#annualBaseInfoColor4").css("color", "#804000");
                                $("#addrForColor1").css("color", "#131313");
                                $("#addrForColor2").css("color", "#131313");
                                $("#uniscIdForColor1").css("color", "#131313");
                                $("#uniscIdForColor2").css("color", "#131313");
                                $("#uniscIdForColor3").css("color", "#131313");
                                $("#uniscIdForColor4").css("color", "#131313");
                                $("#entNameForColor1").css("color", "#131313");
                                $("#entNameForColor2").css("color", "#131313");
                                $("#entNameForColor3").css("color", "#131313");
                                $("#entNameForColor4").css("color", "#131313");
                                $("#telForColor1").css("color", "#131313");
                                $("#telForColor2").css("color", "#131313");
                                $("#telForColor3").css("color", "#131313");
                                $("#telForColor4").css("color", "#131313");
                                $("#postForColor1").css("color", "#131313");
                                $("#postForColor2").css("color", "#131313");
                                $("#emailForColor1").css("color", "#131313");
                                $("#emailForColor2").css("color", "#131313");
                                $("#emailForColor3").css("color", "#131313");
                                $("#empNumForColor1").css("color", "#131313");
                                $("#empNumForColor2").css("color", "#131313");
                                $("#empNumForColor3").css("color", "#131313");
                                $("#empNumForColor4").css("color", "#131313");
                                $("#busStForColor1").css("color", "#131313");
                                $("#busStForColor2").css("color", "#131313");
                                $("#dependForColor2").css("color", "#131313");
                                $("#SfcfarnumForColor3").css("color", "#131313");
                                $("#SfcannNewMemNumForColor3").css("color", "#131313");
                                $("#SfcannRedMemNumForColor3").css("color", "#131313");
                                $("#pbNameForColor4").css("color", "#131313");
                                $("#PbfundAmForColor4").css("color", "#131313");
                            }

                            return "<tr>" + row.alitem + "</tr>";
                        }
                    }, {
                        "targets": [0],
                        "render": function (data, x, obj, index, y) {
                            return index.row + index.settings._iDisplayStart + 1;
                        }
                    }]
            });
        }
    }


    //默认网店信息为  否
    $("#webIsOrNot").html("否");

    //是否有网站网店信息
    var dataForWeb = null;
    //年报中网站网店信息  全部信息
    if (webSiteInfoUrl != null) {
        $.ajax({
            url: webSiteInfoUrl + "?entType=" + ent_type_result,
            async: false,
            success: function (data) {
                if (data.totalPage > 1) {
                    $("#annualWebAll").html("").html("<span id='annualWebColor' >网站或网店信息</span> <a href='" + allWebInfoModelUrl + "?entType=" + ent_type_result + "' target='_blank' style='float:right;color:#804000;'>查看全部 &gt;&gt;</a>");
                } else {
                    $("#annualWebAll").html("").html("<span id='annualWebColor' >网站或网店信息</span>");
                }
                dataForWeb = data.data;
                if (dataForWeb != null && dataForWeb.length > 0) {
                    $("#webIsOrNot").html("是");
                } else {
                    $("#webIsOrNot").html("否");
                }
                if (data != null && data.data.length > 0) {
                    var str = "";
                    //格子形式网站网店信息
                    if (data.data.length > 0) {
                        for (var i = 0; i < data.data.length; i++) {
                            var strForWeb = "";
                            if (data.data[i].webSitName != null && data.data[i].webSitName != "" && data.data[i].webSitName.length > 0) {
                                if (data.data[i].webSitName.length > 14) {
                                    strForWeb = data.data[i].webSitName.substring(0, 14);
                                    strForWeb += "...";
                                } else {
                                    strForWeb = data.data[i].webSitName;
                                }
                            }
                            var strForDomain = "";
                            if (data.data[i].domain != null && data.data[i].domain != "" && data.data[i].domain.length > 0) {
                                if (data.data[i].webSitName.length > 18) {
                                    strForDomain = data.data[i].domain.substring(0, 18);
                                    strForDomain += "...";
                                } else {
                                    strForDomain = data.data[i].domain;
                                }
                            }
                            str = str + '<li><a><div style="font-size:14px;color:#333333;" title="' + data.data[i].webSitName + '">' + strForWeb +
                                '</div><span style="font-size:12px;color:#666666;">· 类型 : '
                                + '<span style="font-size:12px;color:#333333;" title=' + (data.data[i].webType == 1 ? "网站" : "网店") + '>' + (data.data[i].webType == 1 ? "网站" : "网店") + '</span>' +
                                '</span><div style="font-size:12px;color:#666666;position:relative;top:-10px;">· 网址 : ' +
                                '<span style="font-size:12px;color:#333333;" title="' + data.data[i].domain + '">' + strForDomain + '</span></div></a></li>';
                        }
                        $("#webSiteList").html("").html(str);
                    }
                } else {
                    $("#webSiteList").html("").html("<tr class='odd'><td  style='background:#F3F7FA;' width='1077px' id='dataTables_empty' colspan='4'>暂无网站或网店信息</td></tr>");
                }

            }
        });
    }

    //初始化  对外投资信息 变量
    var forinvestmentforhome = null;

    //默认是否有投资信息或购买其他公司股权  否
    $("#forInvestment").html("否");

    //年报中对外投资信息  全部信息
    if (forInvestmentUrl != null) {
        $.ajax({
            url: forInvestmentUrl,
            async: false,
            success: function (data) {
                if (data.totalPage > 1) {
                    $("#annualToOutAll").html("").html("<span id='annualToOutColor' >对外投资信息</span><a href='" + allForgModelUrl + "' target='_blank' style='float:right;color:#804000;'>查看全部 &gt;&gt;</a>");
                } else {
                    $("#annualToOutAll").html("").html("<span id='annualToOutColor' >对外投资信息</span>");
                }
                forinvestmentforhome = data.data;
                if (forinvestmentforhome != null && forinvestmentforhome.length > 0) {
                    $("#forInvestment").html("是");
                } else {
                    $("#forInvestment").html("否");
                }
                //格子形式  对外投资信息
                if (data != null && data.data.length > 0) {
                    var str = "";
                    for (var i = 0; i < data.data.length; i++) {
                        var strForEntName = "";
                        if (data.data[i].entName != "" && data.data[i].entName != null && data.data[i].entName.length > 0) {
                            if (data.data[i].entName.length > 22) {
                                strForEntName = data.data[i].entName.substring(0, 22);
                                strForEntName += "...";
                            } else {
                                strForEntName = data.data[i].entName;
                            }
                        }

                        var strForUnscId = "";
                        if (data.data[i].uniscId != "" && data.data[i].uniscId != null && data.data[i].uniscId.length > 0) {
                            if (data.data[i].uniscId.length > 14) {
                                strForUnscId = data.data[i].uniscId.substring(0, 14);
                                strForUnscId += "...";
                            } else {
                                strForUnscId = data.data[i].uniscId;
                            }
                        }

                        str = str + '<li><a><div style="font-size:14px;color:#333333;" title=' + data.data[i].entName + '>'
                            + '' + strForEntName +
                            '</div><span style="font-size:12px;color:#666666;">· 统一社会信用代码/注册号 : '
                            + '<span style="font-size:12px;color:#333333;" title=' + data.data[i].uniscId + '>' + strForUnscId + '</span></span></a></li>';
                    }
                    $("#forInvsmentList").html("").html(str);
                } else {
                    $("#forInvsmentList").html("").html("<tr class='odd'><td  style='background:#F3F7FA;' width='1077px' id='dataTables_empty' colspan='4'>暂无对外投资信息</td></tr>");
                }
            }
        });
    }
}
	